﻿using System;
using System.Collections.Generic;
using System.Text;
using Pahan.McuFusion.Common;

namespace Pahan.McuFusion.Atmel.AVR
{
    [Serializable]
    public class AvrMemorySerialOptions
    {
        protected AvrMemorySerialOptions()
        {
        }

        public AvrMemorySerialOptions(int pageSize, int writeDelay, int eraseDelay)
        {
            Assert.Greater(pageSize, "pageSize", 0);
            Assert.GreaterOrEqual(writeDelay, "writeDelay", 0);
            Assert.GreaterOrEqual(eraseDelay, "eraseDelay", 0);

            this.PageSize = pageSize;
            this.WriteDelay = writeDelay;
            this.EraseDelay = eraseDelay;
        }
        
        public int PageSize
        {
            get;
            private set;
        }

        public int WriteDelay
        {
            get;
            private set;
        }

        public int EraseDelay
        {
            get;
            private set;
        }
    }
}
